<extend name='Index:index'/>
<block name='admin_right'>
	<div class="right col-md-9">
		<form class="col-sm-7 form-horizontal" action="<{:U('edit_handle')}>" method="post" enctype="multipart/form-data">
				  <div class="form-group">
				    <label class="col-sm-4 control-label">商品名称</label>
				    <div class="col-sm-5">
				      <input type="text" class="form-control " name="name" value="<{$shoprow['name']}>">
				    </div>
				  </div>
				  <div class="form-group">
				    <label class="col-sm-4 control-label">商品价格</label>
				    <div class="col-sm-3">
				      <input type="text" class="form-control " name="price" value="<{$shoprow['price']}>">
				    </div>
				  </div>
				  <div class="form-group">
				    <label class="col-sm-4 control-label">库存</label>
				    <div class="col-sm-3">
				      <input type="text" class="form-control " name="stock" value="<{$shoprow['stock']}>">
				    </div>
				  </div>
				 <div class="form-group">
				   <label class="col-sm-4 control-label">是否上架</label>
				   <div class="col-sm-3">
				   		<if condition="$shoprow['shelf'] eq 1">
				   			<input type="radio" checked name='shelf' value='1'>上架
				   			<input type="radio"   name='shelf' value='0'>下架
				   		<else/>
				   			<input type="radio"  name='shelf' value='1'>上架
							<input type="radio" checked name='shelf' value='0'>下架
				   		</if>
				   </div>
				 </div>
				 <div class="form-group">
				   <label class="col-sm-4 control-label">品牌分类</label>
				   <div class="col-sm-3">
				     <select class="form-control" name="class_brand" id="">
				     	<volist name='classrows' id='classrow'>
				     		<option value="<{$classrow['id']}>" disabled><{$classrow['name']}></option>
				     		<volist name='brandrows' id='brandrow'>
				     		<if condition="$classrow['id'] eq $brandrow['class_id']">
				     			<if condition="$shoprow['brand_id'] eq $brandrow['id']">
				     			<option value="<{$classrow['id']}>-<{$brandrow['id']}>" selected>|--<{$brandrow['name']}></option>
				     			<else/>
				     			<option value="<{$classrow['id']}>-<{$brandrow['id']}>">|--<{$brandrow['name']}></option>
				     			</if>
				     		</if>
				     		</volist>
				     	</volist>
				     </select>
				   </div>
				 </div>
				 <div class="form-group">
				   <label class="col-sm-4 control-label">原图</label>
				  	<img src="__PUBLIC__/upload/shop/t_<{$shoprow['img']}>" alt="">
				 </div>
				 <div class="form-group">
				   <label class="col-sm-4 control-label">上传图片</label>
				   <div class="col-sm-3">
				     <input type="file"  name="img">
				   </div>
				 </div>
				 <input type="hidden" name="id" value="<{$shoprow['id']}>">
				 <input type="hidden" name='imgsrc' value="<{$shoprow['img']}>">
				  <div class="form-group">
				    <div class="col-sm-offset-2 col-sm-10">
				      <button type="submit" class="btn btn-primary">修改</button>
				      <button type="reset" class="btn btn-danger">取消</button>
				    </div>
				  </div>
				</form>

	</div>
</block>